<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="uft-8">
  	<title>练习</title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		div{
			width: 300px;
			height: 100px;
			margin: 200px auto;
			border: 1px solid black;
			overflow: hidden;
		}
		div ul{
			width: 2000px;
			height: 100px;
			background-color: black;
			animation: move 10s linear 0s infinite normal;
		}
		div ul li{
			float: left;
			width: 150px;
			height: 100px;
			list-style: none;
			border: 1px solid black;
			box-sizing: border-box;
		}
		div ul:hover{
			animation-play-state: paused;
		}
		div ul:hover li{
			opacity: 0.5;
		}
		div ul li:hover{
			opacity: 1;
		}
		ul li img{
			width: 150px;
			height: 100px;
		}
		@keyframes move{
			from{
				margin-left: 0;
			}
			to{
				margin-left: -600px;
			}
		}
	</style>
</head>
<body>
	<div>
		<ul>
			<li><a href="#"><img src="1.jpg"></a></li>
			<li><a href="#"><img src="2.jpg"></a></li>
			<li><a href="#"><img src="3.jpg"></a></li>
			<li><a href="#"><img src="4.jpg"></a></li>
			<li><a href="#"><img src="1.jpg"></a></li>
			<li><a href="#"><img src="2.jpg"></a></li>
		</ul>
	</div>
</body>
</html>